package com.start.cms.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.start.cms.entity.StartCmsCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface StartCmsCategoryMapper extends BaseMapper<StartCmsCategoryEntity> {
    @Update({"update start_cms_category\n" +
            "set has_child=#{state}\n" +
            "where id = #{categoryId}"})
    void updateCategoryChildState(@Param("categoryId") String categoryId, @Param("state") boolean state);
}
